import React from "react";
import styled from "styled-components";
import loadingGif from "../../assets/images/loading.gif";

const BottomLoadingWrapper = styled.p`
  text-align: center;
  line-height: 30px;
  color: #888;
  font-size: 14px;
  span {
    background: url(${loadingGif}) no-repeat;
    background-position: 0;
    background-size: 20px;
    padding-left: 30px;
  }
`;
function BottomLoading(props) {
  const { loaded } = props;
  return (
    <BottomLoadingWrapper>
      {loaded ? "全部加载完" : <span>正在加载...</span>}
    </BottomLoadingWrapper>
  );
}

export default React.memo(BottomLoading);
